﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
	xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"
	xmlns:WorldMap="clr-namespace:TheGameClient.WorldMap"
	xmlns:local="clr-namespace:TheGameClient"
	xmlns:controlsDWM="clr-namespace:Waaahsabi.Controls.DWM;assembly=Waaahsabi.Controls.DWM"
	xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions" 
    xmlns:ee="http://schemas.microsoft.com/expression/2010/effects"
	xmlns:controlsTheGame="clr-namespace:Waaahsabi.Controls.TheGame;assembly=Waaahsabi.Controls.TheGame"
	xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing" 
    mc:Ignorable="d"
	x:Class="TheGameClient.MainPage"
	d:DesignWidth="1024" d:DesignHeight="768">

	<UserControl.Resources>


        <Style x:Key="TaskBarMainButton" TargetType="Button">
			<Setter Property="Background" Value="#FF1F3B53"/>
			<Setter Property="Foreground" Value="#FF000000"/>
			<Setter Property="Padding" Value="3"/>
			<Setter Property="BorderThickness" Value="1"/>
			<Setter Property="BorderBrush">
				<Setter.Value>
					<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
						<GradientStop Color="#FFA3AEB9" Offset="0"/>
						<GradientStop Color="#FF8399A9" Offset="0.375"/>
						<GradientStop Color="#FF718597" Offset="0.375"/>
						<GradientStop Color="#FF617584" Offset="1"/>
					</LinearGradientBrush>
				</Setter.Value>
			</Setter>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="Button">
						<Grid Width="48" Height="48" UseLayoutRounding="True">
							<VisualStateManager.VisualStateGroups>
								<VisualStateGroup x:Name="CommonStates">
									<VisualState x:Name="Normal"/>
									<VisualState x:Name="MouseOver">
										<Storyboard>
											<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="highlighter" Storyboard.TargetProperty="(UIElement.Visibility)">
												<DiscreteObjectKeyFrame KeyTime="00:00:00">
													<DiscreteObjectKeyFrame.Value>
														<Visibility>Visible</Visibility>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
											<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="highlighter" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Offset)">
												<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
											</DoubleAnimationUsingKeyFrames>
											<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="highlighter" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
												<EasingColorKeyFrame KeyTime="00:00:00" Value="#FFF10000"/>
											</ColorAnimationUsingKeyFrames>
											<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="highlighter" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Offset)">
												<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0.44"/>
											</DoubleAnimationUsingKeyFrames>
											<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="highlighter" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
												<EasingColorKeyFrame KeyTime="00:00:00" Value="#FFFF8600"/>
											</ColorAnimationUsingKeyFrames>
											<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="path" Storyboard.TargetProperty="(UIElement.OpacityMask).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
												<EasingColorKeyFrame KeyTime="00:00:00" Value="#3F000000"/>
											</ColorAnimationUsingKeyFrames>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="Pressed">
										<Storyboard>
											<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="highlighter" Storyboard.TargetProperty="(UIElement.Visibility)">
												<DiscreteObjectKeyFrame KeyTime="00:00:00">
													<DiscreteObjectKeyFrame.Value>
														<Visibility>Visible</Visibility>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="Disabled"/>
								</VisualStateGroup>
								<VisualStateGroup x:Name="FocusStates">
									<VisualState x:Name="Focused"/>
									<VisualState x:Name="Unfocused"/>
								</VisualStateGroup>
							</VisualStateManager.VisualStateGroups>
							<Ellipse>
								<Ellipse.Stroke>
									<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
										<GradientStop Color="Black" Offset="0"/>
										<GradientStop Color="White" Offset="1"/>
									</LinearGradientBrush>
								</Ellipse.Stroke>
								<Ellipse.Fill>
									<RadialGradientBrush GradientOrigin="0.5,0.808" RadiusX="0.507" RadiusY="0.571" Center="0.501,0.447">
										<GradientStop Color="Black" Offset="1"/>
										<GradientStop Color="White"/>
									</RadialGradientBrush>
								</Ellipse.Fill>
							</Ellipse>
							<Ellipse x:Name="highlighter" StrokeThickness="0" Visibility="Collapsed">
								<Ellipse.Effect>
									<BlurEffect Radius="10"/>
								</Ellipse.Effect>
								<Ellipse.Fill>
									<RadialGradientBrush RadiusX="0.51" RadiusY="1.896">
										<GradientStop Color="Black" Offset="1"/>
										<GradientStop Color="Red" Offset="0.013"/>
									</RadialGradientBrush>
								</Ellipse.Fill>
							</Ellipse>
							<ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}">
								<ContentPresenter.Effect>
									<DropShadowEffect ShadowDepth="1" Direction="275" BlurRadius="2" Opacity="0.75"/>
								</ContentPresenter.Effect>
							</ContentPresenter>
							<Path x:Name="path" Stretch="Fill" StrokeLineJoin="Round" Data="M 416,256C 433.673,256 448,270.327 448,288C 448,289.848 447.843,291.659 447.543,293.421C 439.075,290.037 428.162,288 416.25,288C 404.118,288 393.021,290.113 384.49,293.611C 384.168,291.789 384,289.914 384,288C 384,270.327 398.327,256 416,256 Z " Height="24.233" HorizontalAlignment="Center" Margin="0,0,0,20.5" VerticalAlignment="Bottom" Width="41.836" UseLayoutRounding="False">
								<Path.Fill>
									<RadialGradientBrush Center="0.501,0.866" GradientOrigin="0.501,0.866" RadiusY="0.868" RadiusX="0.544">
										<GradientStop Color="Transparent" Offset="0.241"/>
										<GradientStop Color="White" Offset="1"/>
									</RadialGradientBrush>
								</Path.Fill>
								<Path.OpacityMask>
									<LinearGradientBrush EndPoint="0.49,1.168" StartPoint="0.5,0">
										<GradientStop Offset="1"/>
										<GradientStop Color="White"/>
									</LinearGradientBrush>
								</Path.OpacityMask>
							</Path>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Style x:Key="TaskbarStyle1" TargetType="controlsDWM:Taskbar">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="controlsDWM:Taskbar">
						<Grid d:DesignHeight="561" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}">
							<VisualStateManager.CustomVisualStateManager>
								<ei:ExtendedVisualStateManager/>
							</VisualStateManager.CustomVisualStateManager>
							<VisualStateManager.VisualStateGroups>
								<VisualStateGroup x:Name="Default" ei:ExtendedVisualStateManager.UseFluidLayout="True">
									<VisualStateGroup.Transitions>
										<VisualTransition GeneratedDuration="0:0:0.5">
											<VisualTransition.GeneratedEasingFunction>
												<QuarticEase EasingMode="EaseInOut"/>
											</VisualTransition.GeneratedEasingFunction>
										</VisualTransition>
									</VisualStateGroup.Transitions>
									<VisualState x:Name="StartMenuOn">
										<Storyboard>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="grdStartMenu">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<Thickness>64,10,0,0</Thickness>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="Idle"/>
								</VisualStateGroup>
							</VisualStateManager.VisualStateGroups>
							<Grid x:Name="grdStartMenu" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="-195,10,0,0">
								<controlsDWM:StartMenu x:Name="startMenu" MinWidth="250" HorizontalAlignment="Left" VerticalAlignment="Top" Width="250"/>
							</Grid>
							<Border
								BorderBrush="{TemplateBinding BorderBrush}"
								CornerRadius="0,10,0,0" HorizontalAlignment="Left" MinWidth="64" VerticalAlignment="Bottom" Width="64"/>
							<Border BorderBrush="#7FFFFFFF" BorderThickness="0.75" CornerRadius="0,5,0,0" Width="64" HorizontalAlignment="Left">
								<Border.Background>
									<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
										<GradientStop Color="#FF5A5A5A" Offset="0.5"/>
										<GradientStop Color="#FF3C3C3C" Offset="0"/>
										<GradientStop Color="#FF3C3C3C" Offset="1"/>
									</LinearGradientBrush>
								</Border.Background>
							</Border>
							<Grid x:Name="statusArea" Height="60" Width="60" VerticalAlignment="Bottom" HorizontalAlignment="Left" Margin="2,0,0,0">
								<Border BorderBrush="{StaticResource WindowButtonIconGradient}" BorderThickness="0.5,0.5,0.5,0" CornerRadius="3,3,0,0" Margin="3,0">
									<Border.Background>
										<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
											<GradientStop Color="#3FB0B0B0" Offset="1"/>
											<GradientStop Color="#3FFFFFFF"/>
										</LinearGradientBrush>

									</Border.Background>
								</Border>
								<ItemsControl Margin="3,1"/>
							</Grid>
							<StackPanel x:Name="stkButtonList" Margin="0,5,0,0" HorizontalAlignment="Left">
								<Button x:Name="btnMain" Style="{StaticResource TaskBarMainButton}" Height="48" HorizontalAlignment="Left" VerticalAlignment="Top" Width="48" Margin="8,0,8,32" Padding="5">
									<!-- -->
									<Path Stretch="Fill" StrokeLineJoin="Round" Stroke="#FF000000" Fill="#FF560000" Data="M 339.882,53.4904L 362.51,76.1178L 338.751,99.8768C 356.416,126.541 356.416,161.459 338.751,188.123L 362.51,211.882L 339.882,234.51L 316.123,210.751C 289.459,228.416 254.541,228.416 227.877,210.751L 204.118,234.51L 181.49,211.882L 205.249,188.123C 187.583,161.459 187.583,126.541 205.249,99.8767L 181.49,76.1178L 204.118,53.4904L 227.877,77.2494C 254.541,59.5836 289.459,59.5836 316.123,77.2494L 339.882,53.4904 Z M 294.627,144L 315.323,164.696C 321.559,151.644 321.559,136.357 315.323,123.304L 294.627,144 Z M 272,166.627L 251.304,187.324C 264.356,193.559 279.643,193.559 292.696,187.324L 272,166.627 Z M 249.373,144L 228.676,123.304C 222.441,136.357 222.441,151.644 228.676,164.696L 249.373,144 Z M 272,121.373L 292.696,100.677C 279.643,94.4413 264.356,94.4413 251.304,100.677L 272,121.373 Z " StrokeThickness="0" Height="24" Margin="5" Width="24" UseLayoutRounding="False"/>
								</Button>
							</StackPanel>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Storyboard x:Name="calloutAnimation"/>
	</UserControl.Resources>

	<Grid x:Name="LayoutRoot" Background="{StaticResource DefaultBackgroundColor}">
		<VisualStateManager.CustomVisualStateManager>
			<ei:ExtendedVisualStateManager/>
		</VisualStateManager.CustomVisualStateManager>
		<VisualStateManager.VisualStateGroups>
			<VisualStateGroup x:Name="ChatStates" ei:ExtendedVisualStateManager.UseFluidLayout="True">
				<VisualStateGroup.Transitions>
					<VisualTransition GeneratedDuration="0:0:0.5">
						<VisualTransition.GeneratedEasingFunction>
							<CubicEase EasingMode="EaseInOut"/>
						</VisualTransition.GeneratedEasingFunction>
					</VisualTransition>
				</VisualStateGroup.Transitions>
				<VisualState x:Name="ChatExpanded"/>
				<VisualState x:Name="ChatCollapsed">
					<Storyboard>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="chatControl">
							<DiscreteObjectKeyFrame KeyTime="0">
								<DiscreteObjectKeyFrame.Value>
									<Thickness>0,0,0,-200</Thickness>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
					</Storyboard>
				</VisualState>
			</VisualStateGroup>
		</VisualStateManager.VisualStateGroups>
		<Grid.CacheMode>
			<BitmapCache/>
		</Grid.CacheMode>
		<Canvas x:Name="cnvDesktop" Margin="64,0,0,0"/>
		<local:MapButtonControl x:Name="worldMapButton" Height="64" HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="128" OnClick="worldMapButton_OnClick" Effect="{StaticResource BlackGlow}"/>
		<controlsDWM:Taskbar x:Name="taskBar" Margin="0,16,0,0" Visibility="Collapsed"/>
		<controlsTheGame:ChatControl x:Name="chatControl" HorizontalAlignment="Center" Height="224" VerticalAlignment="Bottom" Width="700" Margin="0" InputVisibility="Collapsed" Effect="{StaticResource BlackGlow}"/>
		<Canvas x:Name="cnvActivePrograms"/>
		<local:HeartBeater x:Name="heartBeater" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,5,5,0"/>
	</Grid>
</UserControl>